<?php


namespace RedMVC\CodeGenerator;
use RedMVC;

/**
 * PhpClassProperty class
 *
 * @category    RedMVC
 * @package     CodeGenerator
 * @author      Jan Fischer, bitWorking <info@bitworking.de>
 */
class PhpClassProperty{

    protected $_viewScript;

    protected $_visibility;
    protected $_name;
    protected $_value;

    public function __construct($visibility = null, $name = null, $value = null){
        $this->setVisibility($visibility);
        $this->setName($name);
        $this->setValue($value);
        $this->_viewScript = LIB_PATH.DS.'RedMVC'.DS.'CodeGenerator'.DS.'views'.DS.'phpClassProperty.phtml';
    }

    public function setVisibility($visibility){
        $this->_visibility = $visibility;
    }

    public function setName($name){
        $this->_name = $name;
    }

    public function setValue($value){
        $this->_value = $value;
    }

    public function render(){
        ob_start();
        include($this->_viewScript);
        return ob_get_clean();
    }

}